package com.guaoran.activity.services.processor.constants;


import com.guaoran.activity.dal.entitys.ActDrawAward;
import com.guaoran.activity.draw.bean.ActivityTurntableDrawReq;

/**
 * redis key 管理类
 */
public class RedisKeyManager {

    /**
     * 正在抽奖的key
     * @param activityTurntableDrawReq
     * @return
     */
    public static String getDrawingRedisKey(ActivityTurntableDrawReq activityTurntableDrawReq) {
        return DrawConstants.DRAWING_PREFIX + String.valueOf(activityTurntableDrawReq.getUid());
    }

    public static String getAwardRedisKey(ActDrawAward actDrawAward) {
        return DrawConstants.DRAW_AWARD + actDrawAward.getAwardType() + ":" + actDrawAward.getId();
    }
}
